package basic.clients;

import basic.Notifiable;
import basic.Notification;

public class SimpleSubscriber implements Notifiable {
	private String name;
	

	public SimpleSubscriber(){
		name = null;
	}
	
	public SimpleSubscriber(String name){
		this.name = name;
	}
	
    public void notify(Notification e) {
    //	System.out.println(name + " yeah: " + e.getAttribute("message"));
    	System.err.println(name + " got this notification: " + e.toString());
    }

    public void notify(Notification s[]) {
    	
    	for(Notification n: s){
    		System.out.println(name + " yeah: " + n.getAttribute("message"));
    	}
    }
} 